import random

def ran_num():
    ran_num=set()
    for x in range(1,9):
        y=random.randint(1,33)
        if y in ran_num:
            y=random.randint(1,33)
        ran_num.add(y)
    return ran_num;



guess_num = set()
for i in range(1,9):
    j=input("请输入第"+str(i)+"个数：")
    if (int(j)<1) | (int(j)>33):
        j=input("您输入错误的数，请重新输入第"+str(i)+"个数：")
    if j in guess_num:
         j=input("您输入重复的数，请重新输入第"+str(i)+"个数：")
        
    guess_num.add(j)

print("您输入的数为"+str(guess_num))

right=guess_num & ran_num()
if len(right)==8:
    print("您中了一等奖")
elif len(right)==7:
    print("您中了二等奖")
elif len(right)==6:
    print("您中了三等奖")
elif len(right)==5:
    print("您中了四等奖")
else:
    print("您没中奖")

print("中奖号码为"+str(ran_num()))
print("下面是买一万注的")


change=set()
while i<10000:
    h = ran_num();
    change=h & ran_num()
    if len(change)==8:
        print("您中了一等奖")
    elif len(change)==7:
        print("您中了二等奖")
    elif len(change)==6:
        print("您中了三等奖")
    elif len(change)==5:
        print("您中了四等奖")
    else:
        print("您没中奖")
    i+=1
   
    




    
